package cn.edu.gsau.info.controller;

import cn.edu.gsau.info.models.Lunwenleixing;
import cn.edu.gsau.info.models.ResponseResult;
import cn.edu.gsau.info.service.ILunwenleixingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/lunwenleixing")
public class LunwenleixingController {
    @Autowired
    private ILunwenleixingService iLunwenleixingService;


    @GetMapping("/findall")
    public ResponseResult findall(){
        List<Lunwenleixing> list = iLunwenleixingService.list();
        return new ResponseResult(200 , "查询成功" , list);
    }

//    @PostMapping("/add")
//    public ResponseResult add(@RequestBody Lunwenleixing lunwenleixing){
//        boolean save = iLunwenleixingService.save(lunwenleixing);
//        return new ResponseResult(100 , save == true?"添加成功":"添加失败" , null);
//    }

}
